]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
screenShield: Connect to the actor's show signal instead of using BEFORE_REDRAW
authorAdel Gadllah <adel.gadllah@gmail.com>
Tue, 25 Sep 2012 19:11:10 +0000 (21:11 +0200)
committerRay Strode <rstrode@redhat.com>
Mon, 22 Oct 2012 15:20:30 +0000 (11:20 -0400)
This should make sure that we grab at the right time while at the same time
not break focus handling.

https://bugzilla.gnome.org/show_bug.cgi?id=684650

js/ui/screenShield.js

index 07e450f8fcb0d27370937d7ea93bc92e1dff9a24..e10ef346ba64746ab33a92f952cfc0a6d84fd27d 100644 (file)
@@ -579,13 +579,14 @@ const ScreenShield = new Lang.Class({
     showDialog: function() {
         // Ensure that the stage window is mapped, before taking a grab
         // otherwise X errors out
-        Meta.later_add(Meta.LaterType.BEFORE_REDRAW, Lang.bind(this, function() {
+        let actorShownId = 0;
+        actorShownId = this.actor.connect('show', Lang.bind(this, function() {
             if (!this._isModal) {
                 Main.pushModal(this.actor);
                 this._isModal = true;
             }
 
-            return false;
+            this.actor.disconnect(actorShownId);
         }));
 
         this.actor.show();